package com.example.pdr;

import android.hardware.SensorEventListener;
import android.hardware.SensorManager;

public class SensorManagerUtil {

    private final SensorManager sensorManager;

    public SensorManagerUtil(SensorManager sensorManager) {
        this.sensorManager = sensorManager;
    }

    public void registerListener(SensorEventListener listener, android.hardware.Sensor sensor, int rate) {
        sensorManager.registerListener(listener, sensor, rate);
    }

    public void unregisterListener(SensorEventListener listener) {
        sensorManager.unregisterListener(listener);
    }
}